package com.jun.flower.controller;

import java.util.HashMap;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.jun.flower.service.AdministratorService;

@Controller
public class AdministratorController {
	@Autowired
	private AdministratorService administratorService;
	
	@RequestMapping("/administrator/login")
	@ResponseBody
	public Map loginAdministrator(String administratorname,String password) {
		boolean result = administratorService.loginAdministrator(administratorname, password);
		Map data = new HashMap<>();
		data.put("status", result);
		return data;
	}
}
